﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AjaxRadioList.aspx.cs" Inherits="Omu.AwesomeWebFormsDemo.AjaxRadioList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 <h1>AjaxRadioList</h1>
<p class="xpl">a radiobutton list with all the binding posibilities (like the AjaxDrodown) </p>

 <h2>simple AjaxRadioList</h2>
 <o:AjaxRadioList runat="server" ID="Country" Url="~/svc/aja.svc/CountriesDropdown" Value="56797552-87D5-478b-85B8-797D45C9315F">
        </o:AjaxRadioList>      
        <h2>
            bound to one AjaxRadioList by parentId</h2>
        <o:AjaxRadioList runat="server" ID="Categories" Url="~/svc/aja.svc/CategoriesDropdown" Value="1">
        </o:AjaxRadioList> = 
        <%
            Fruits.ParentId = Categories.ClientID;
        %>
        <o:AjaxRadioList runat="server" ID="Fruits" Url="~/svc/aja.svc/FruitsList"></o:AjaxRadioList>
        <h2>
            bound to an AjaxRadioList and an AjaxDropdown using Data</h2>
        <o:AjaxRadioList runat="server" ID="Cat1" Url="~/svc/aja.svc/CategoriesDropdown" Value="1">
        </o:AjaxRadioList> and 
        <o:AjaxDropdown runat="server" ID="Cat2" Url="~/svc/aja.svc/CategoriesDropdown" Value="4">
        </o:AjaxDropdown>    =
            <%
            FruitsFrom2Cat.Data = new Dictionary<string, string>
                                {
                                    {"c1",Cat1.ClientID},
                                    {"c2",Cat2.ClientID}
                                };
%>
        <o:AjaxRadioList runat="server" ID="FruitsFrom2Cat" Url="~/svc/aja.svc/FruitsFrom2CatList"></o:AjaxRadioList>
        
     <h2>bound to Multilookup</h2>
        <o:MultiLookup runat="server" ID="Categories2" GetMultipleUrl="~/svc/aja.svc/CategoryGetMultiple"
            SearchUrl='~/svc/aja.svc/CategorySearch' SelectedUrl="~/svc/aja.svc/CategorySelected"
            Value='["1","2","3"]' OkText="Select" CancelText="Close window"
            Title="Select items and by clicking the up and down buttons" PopupWidth="900" PopupHeight="500" />
            
            <%
            FruitsFromMulti.ParentId = Categories2.ClientID;
%>
            <o:AjaxRadioList runat="server" ID="FruitsFromMulti" Url="~/svc/aja.svc/FruitsFromMultiList"></o:AjaxRadioList>
        <h2>bound to a simple TextBox</h2>
        write 1 or 2 or ... 5
        <asp:TextBox runat="server" ID="txtCategory" Text="1"></asp:TextBox>
          <%
            FruitBoundToTxt.ParentId = txtCategory.ClientID;
        %>
        <o:AjaxRadioList runat="server" ID="FruitBoundToTxt" Url="~/svc/aja.svc/FruitsList"></o:AjaxRadioList> 
               
        
        <h2>Send "Parameters" with predefined values</h2>
        <%
            FruitWithPars.Parameters = new Dictionary<string, string>{ {"category","3"}, {"hi","foo"}, {"ho", "bar"} };
             %>
        <o:AjaxRadioList runat="server" ID="FruitWithPars" Url="~/svc/aja.svc/FruitsWithParsDropdown"></o:AjaxRadioList>
            <br/> 
        <br/>      
        
        <asp:Button ID="Button1" runat="server" Text="Submit" />      
</asp:Content>